#ifndef _LCD8_0_DRV_H_
#define _LCD8_0_DRV_H_

#include <stdint.h>
#include "fonts.h"
#include "picture.h"

#define LCD_PIXEL_WIDTH       240
#define LCD_PIXEL_HEIGHT      400

#define WHITE                 0xFFFF //白色
#define BLACK                 0x0000 //黑色
#define BLUE                  0x001F //蓝色
#define BRED                  0xF81F //红色
#define GRED                  0xFFE0 //红色
#define GBLUE                 0x07FF //蓝色
#define RED                   0xF800 //红色
#define MAGENTA               0xF81F //品红
#define GREEN                 0x07E0 //绿色
#define CYAN                  0x7FFF //青色
#define YELLOW                0xFFE0 //黄色
#define BROWN                 0xA145 //褐色
#define BRRED                 0xFC07 //棕红色
#define GRAY                  0x8430 //灰色
#define IRONGRAY              0xAD55 //铁灰色
//#define IRONGRAY              0x62CA //铁灰色
#define ORANGE                0xFD20 //橙色
//#define PURPLE                0x8010 //紫色
#define PURPLE                0xC81F //紫色
#define MIDBLUE               0x8430   

typedef struct
{
    uint16_t x;
    uint16_t y;
} LcdPoint_t;

/** Represents an area of the screen.*/
typedef struct
{
    uint16_t x1;
    uint16_t y1;
    uint16_t x2;
    uint16_t y2;
} LcdArea_t;

void LcdDrvInit(void);
void LcdFillPureColor(LcdArea_t *area, uint16_t color);
void LcdDrawString(uint16_t x, uint16_t y, char *str, uint16_t textColor, uint16_t bkColor, AsciiFontDesc_t *font);
void LcdDrawPicture(uint16_t x, uint16_t y, uint16_t pictureColor, uint16_t bkColor, PictureDesc_t *picDesc);
void LcdDrawChinese(uint16_t x, uint16_t y, uint16_t textColor, uint16_t bkColor, ChineseFontDesc_t *font);
void TurnOnScreen(void);
void TurnOffScreen(void);
#endif
